// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(16,1) == 0;
	question = "special";
	text1 = "There is an imposing chain of mountains to the south. They stand between you and the Storm Plains, the next province to the south. They aren't as tall or perpetually shrouded with ice as the Whitespires, but they are still an obstacle.";
	text2 = "Looking to the south, you can see a narrow pass running through the mountains. This looks like one of the few navigable routes south. Though it is partially obscured by the mist, you can barely see the spires of a fort guarding the pass.";
	text3 = "The road here is covered with tracks. You can see the ruts left by caravan wagons, but they aren't fresh. The most recent travelers were large bugs. You can see the telltale round, deep tracks left by their chitinous legs.";
	action = SET_SDF 16 1 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(16,5) == 0;
	question = "special";
	text1 = "You enter the ruins of an abandoned house. It probably belonged to an alchemist, who chose a site far from any town or fort to carry out his or her experiments.";
	text2 = "There are no people here now. It's not empty, though. You hear a hissing, bubbling noise.";
	action = SET_SDF 16 5 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(16,6) == 0;
	question = "special";
	text1 = "You hear the sound of crumbling stone to the north. This is immediately followed by the sound of clicking claws.";
	text2 = "A nest of small clawbugs has picked an awkward time to emerge from the soil. The freshly hatched creatures rush out, looking for prey.";
	action = SET_SDF 16 6 1;
	code =
		set_terrain(29,34,13);
		set_terrain(30,34,15);
		set_attitude(1003,10);
		set_act_at_dist(1003,1);
		
		if (char_ok(78))
			set_foe_target(78,73);
		if (char_ok(79))
			set_foe_target(79,73);
		if (char_ok(80))
			set_foe_target(80,73);
		if (char_ok(81))
			set_foe_target(81,73);
		if (char_ok(82))
			set_foe_target(82,73);
		if (char_ok(83))
			set_foe_target(83,73);
		if (char_ok(84))
			set_foe_target(84,73);
	break;
	
begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Something acidic has dissolved the surface of this sign.";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The obelisk says:";
	text2 = "  Kratoa-Kel, Storm Plains - South";

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Kratoa-Kel - South";
	text3 = "  Helft - North";
	text4 = "  Kaz - East";

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This thahd's physical condition is good. Its mental condition is not as reliable. Thahds, like all battle creations, require a firm hand when commanding them. Its Keeper is not displaying the proper dominance.";
	text2 = "It is also nervous. The presence of rogues always affects loyal creations in this way. You do your best to calm it but, if nothing is done soon, this thahd will become rogue itself.";

begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This thahd has been wounded. Its legs bear the distinctive marks of clawbug stings. The injuries have not been properly tended to.";
	text3 = "You do what you can to make the creature more comfortable, but it needs to return to a friendly settlement to be properly treated.";



begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Sergeant Herne";
	text1 = "There is a loyalist soldier camped here, accompanied by a group of thahds. He is not being properly alert. It takes him a shameful amount of time to notice you approaching his camp.";
	text2 = "However, when you see his situation, it makes sense. He is watching over a half-dozen thahds, but isn't doing a good job of it. Three of them are wounded. The others are confused and scared. He isn't properly maintaining control.";
	text3 = "When he finally sees you, he whips out his blade. The thahds howl. It takes a minute for you to get him to calm down enough to sheathe his weapon. Then he turns and tries to calm down the confused creations.";
	text4 = "Finally, he says, _I'm Sergeant Herne. I'm here to ... Will you all be quiet? ... I'm here to watch the road. It's covered with clawbugs. I was going to try to clear it, but ..._ He looks at the thahds and shakes his head.";
	text5 = "Sergeant Herne alternates between speaking with you and trying to calm the thahds. He isn't having much luck.";
	text6 = "It takes a lot of training for an outsider to learn how to care for and control battle creations, training that he hasn't received. Even then, the creations become unmanageable without occasional contact with a Shaper.";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "How did you get stationed here?";
	text1 = "_Rogue control. We aren't campaigning against the rebels now, but we still have to clean up infestations of rogues. We clear one area and we find a nest somewhere else._";
	text2 = "_Stop that,_ he shouts. He slaps a thahd's hand away from his meal.";
	text3 = "_So clawbugs infest the road up to Kratoa-Kel. So they send me and some thahds. But I'm not a Keeper. I told them so. Made no difference. And it's not going well._ He waves at the three wounded thahds."; 

begintalknode 12;
	state = 10;
	nextstate = 12;
	condition = 1;
	question = "Tell me about the road south.";
	text1 = "He shakes his head. _We'd done a good job of keeping it clear. Or so we thought. The clawbugs were in their nests, keeping low. Then they sprang out. They're nasty in big numbers._";
	text2 = "_I need to clean them out so I can go northeast and deal with the next problem. Then I get to go back to base for a day or two._";

begintalknode 13;
	state = 10;
	nextstate = 16;
	condition = gf(16,2) == 0;
	question = "Can you help me to travel south?";
	text1 = "Herne looks at you. Then he looks at the miserable, sullen creations in his care. He shakes his head.";
	text2 = "_I don't know anything about you. I don't know if I can control them when they have to face rogues. They seem scared of them._";

begintalknode 14;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Why didn't they send a Keeper?";
	text1 = "_They wanted to send someone who had training with these creatures, but the Keeper in our platoon ran a little too slowly when a roaming Unbound spotted us. We hadn't gotten another yet. So I got his thahds._";
	text2 = "_Not fair to them or me, I think. But orders are orders._";

begintalknode 15;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "How did those thahds get wounded?";
	text1 = "_Take a look. It's pretty obvious._ You look closer. They all bear clawbug stings on their legs. The wounds are surrounded by large, gray patches, the effects of the venom.";
	text2 = "If ordered, these poor creatures would happily get up and march into battle, though it would probably kill them. What they need is proper care in Mera, the sort you can't give them out here in the field.";

begintalknode 16;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Will the thahds still obey you?";
	text1 = "_Yes, for now. Not much longer. They're getting angrier. All I want is to push through to Kratoa-Kel and turn them over to a Shaper. With half of them wounded, though, I can't. It's a mess._";

begintalknode 17;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "What is wrong to the northeast?";
	text1 = "_We can't seem to keep the fields south of Mera free of roamers. We keep cleaning them out and they keep coming back. We don't have the forces to keep anyone stationed there permanently._";

begintalknode 18;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "What is near here?";
	text1 = "_Kratoa-Kel is to the south. They're under orders to hold the fort whatever the cost, so they haven't sent anyone down to help._";
	text2 = "_Kaz is to the east. I don't know much about that place._";

begintalknode 19;
	state = 13;
	nextstate = 14;
	condition = 1;
	question = "Tell me about Kratoa-Kel.";
	text1 = "_It's the fort guarding the main pass between here and the Storm Plains. It gets all the soldiers it wants. That way, it can keep the rebels and rogues to the south from slipping into Mera._";
	text2 = "_Makar is in charge up there. Good soldier. Good commander. Nobody better to have on your side when spitting some rebels._";
	text3 = "_Makar is in charge up there. Good soldier. Good commander. Nobody better to have on your side when spitting some rebels. Pity about the whole treason thing._";
	code =
		if (gf(36,1) > 0)
			rs(2);
			else rs(3);
	break;
	
begintalknode 20;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "Are there any other passes to the Storm Plains?";
	text1 = "_There is one west of here, but it's controlled by an Unbound. We haven't gotten up there to retake it yet. The terrain is too rough._";

begintalknode 21;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "What is Kaz?";
	text1 = "_It's a servile settlement, one of two Astoria allows to exist. I hear they're sort of crazy there. We humans know to stay away._";
	text2 = "";

begintalknode 22;
	state = 16;
	nextstate = -1;
	condition = 1;
	question = "If you don't help me, you'll be trapped here.";
	text1 = "_It can't be too long until I get reinforcements. This is a major road. We'll have to wait._";
	text2 = "";

begintalknode 23;
	state = 16;
	nextstate = 17;
	condition = get_stat(20) > 5;
	question = "I can help you control the thahds. If you stay here, though, they're sure to go rogue.";
	text1 = "It takes some convincing, but you manage to make him realize that his position here is untenable. The thought of being alone with crazed thahds terrifies him.";
	text2 = "_All right. I'll help you clear the road. But first, you have to help me make a decision._";
	text3 = "_Three of the thahds are ill. If I command them to help, they will help, but it's sure to kill them. If I tell them to run east to Kaz, they will survive, but they won't help in the assault._";
	text4 = "_Should they fight with us or run to safety?_";

begintalknode 24;
	state = 16;
	nextstate = 10;
	condition = 1;
	question = "Let's talk about something else.";
	text1 = "He seems relieved to change the subject. _Yes?_";

begintalknode 25;
	state = 17;
	nextstate = 10;
	condition = 1;
	question = "They will continue to serve us. Order them to fight.";
	text1 = "Sergeant Herne looks disappointed. _They fought well for us. They don't deserve ... But you seem to know the ways of the Shapers. I'm just an outsider. I'll listen to you._";
	text2 = "_When you are ready to begin the attack, say so._";
	code =
		sf(16,2,1);
		award_party_xp(100,7);
		inc_flag(100,0,3);
	break;
	
begintalknode 26;
	state = 17;
	nextstate = 10;
	condition = 1;
	question = "They shouldn't be forced into suicide. Let them go.";
	text1 = "Sergeant Herne looks relieved. _I'll order for them to head back to safety when we begin our assault. I am glad that you value their lives. They deserve it._";
	text2 = "_When you are ready to begin the attack, say so._";
	code =
		sf(16,2,2);
		award_party_xp(100,7);
		inc_flag(100,0,-3);
	break;

begintalknode 27;
	state = 10;
	nextstate = -1;
	condition = gf(16,2) > 0 && gf(16,3) == 0;
	question = "Begin the attack. I will be with you.";
	text1 = "Working with Herne, you rouse the thahds. His commands are too weakly delivered to have much of an effect, but you lend your authority to his. Little by little, you get the thahds into fighting shape.";
	text2 = "When you are ready, Herne says, _Come with me. I will set the route._";
	text3 = "With a final rueful look at the three doomed thahds, he begins the charge.";
	text4 = "As he begins the charge, the three wounded thahds begin to lope down the road to safety.";
	action = END_TALK;
	code =
		set_act_at_dist(1004,1);
		if (gf(16,2) == 1)
			rs(4);
			else rs(3);
		sf(16,3,1);
	break;

begintalknode 28;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "That is all for now.";
	text1 = "You leave. Sergeant Herne returns to his miserable task.";
	action = END_TALK;
	
//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 36;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 37;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 38;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 39;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 40;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 41;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 42;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 43;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 44;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 62;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 63;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		